﻿using System;
using pheidippides.logging.Classes;
using System.IO;
using System.Reflection;

namespace pheidippides.app.Classes
{
    public class AppControl
    {
        public static void InitializeApplication()
        {
            #region Initialisierung des Loggers

            String LogFilePathPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Logging");
            if (!Directory.Exists(LogFilePathPath))
                Directory.CreateDirectory(LogFilePathPath);
            LogFilePathPath = Path.Combine(LogFilePathPath, "Log_" + DateTime.Now.ToShortDateString() + ".log");
            Logger.Initialize(new TextFileLogger(LogFilePathPath, LogLevel.Debug));

            #endregion
        }
    }
}